/**
 * 打开对话框
 * @param title 标题
 * @param url 页面链接
 * @param icon 图标
 * @param width 宽度
 * @param height 高度
 * @param params 参数
 */
function openDialog(title,url,icon,width,height,params){
	if(width==null||width==''){
		width=600;
	}
	if(height==null||height==''){
		height=400;
	}
	//设置居上的高度浏览器的高度除以2减去弹出框的高度除以2
	var top=window.innerHeight/2-width/2;
	$("#dlg").dialog({
		top:top,
		title:title,
		width:width,
		iconCls:icon,
		height:height,
		//minimizable:true,
		//maximizable:true,
		resizable:true,
		content: '<iframe frameborder="0"  src="'+url+'?'+params+'" style="width:100%;height:98%;"></iframe>' 
	})
}
/**
 * 弹出对话框后添加遮罩层
 */
function addShade(){
	var maskDiv = document.createElement("div"); 
	maskDiv.id = 'shadeid'; 
	maskDiv.style.position = "absolute"; 
	maskDiv.style.zIndex = "1"; 
	maskDiv.style.width = document.body.scrollWidth + "px"; 
	maskDiv.style.height = document.body.scrollHeight + "px"; 
	maskDiv.style.top = "0px"; 
	maskDiv.style.left = "0px"; 
	maskDiv.style.background = "gray"; 
	maskDiv.style.filter = "alpha(opacity=10)"; 
	maskDiv.style.opacity = "0.30";//透明度 
	$(document.body).append(maskDiv);//向body之中增加背景层 
}